<template>
	<view>
		<view class="top" id="top">
			<commonNavBar title="评定等级" :showSearch="false">
				<template v-slot:right>
					<view class="intelligence" @tap="robot">
						<image src="/static/img/robot.png" mode=""></image>
					</view>
				</template>
			</commonNavBar>
			<view class="step">
				<view v-for="(tabs,index) in stepList" :key="index" @click="stepActive(index)">
					<view :class="{'active': tabIndex == index}">
						{{ tabs.step }}
					</view>
				</view>
			</view>
		</view>
		<view class="centre" style="margin-top: 200rpx;">
			<view class="content-container">
				<view class="addInspect" v-show="tabIndex == 0">
					<view class="content">
						<view class="two">
							<view class="title">
								<view class="left">生产经营主体信息</view>
							</view>
							<view class="box">
								<view class="text">
									<view class="topicFlex">主体名称：</view>
									<text>{{ riskData.companyName }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">经营地址：</view>
									<text>{{ riskData.companyAddress }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">统一社会信用代码：</view>
									<text>{{ riskData.creditCode }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">食品许可证：</view>
									<text>{{ riskData.license }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">联系人：</view>
									<text>{{ riskData.contacts }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">联系方式：</view>
									<text>{{ riskData.contactInformation }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">类别： </view>
									<text>{{ riskData.supProcessName }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">类别名称：</view>
									<text>{{ riskData.companyTypeOne }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">上一年度风险等级：</view>
									<text>{{ riskData.lastYearLevel }}</text>
								</view>
							</view>
						</view>
						<view class="three" v-if="riskData.supProcess == 'cyfw' || riskData.supProcess == 'spxs'">
							<view class="title">
								<view class="left">主体画像信息</view>
							</view>
							<view class="box">
								<view class="text">
									食用农产品批发市场：
									<view class="input-container">
										<uni-data-select v-model="riskData.isGongpi" :localdata="baseSelectList"
											:disabled="detail" :clear="false"
											:placeholder="'请选择食用农产品批发市场'"></uni-data-select>
									</view>
								</view>
								<view class="text">
									校园及周边：
									<view class="input-container">
										<uni-data-select v-model="riskData.isXiaoyuan" :localdata="baseSelectList"
											:disabled="detail" :clear="false"
											:placeholder="'请选择校园及周边'"></uni-data-select>
									</view>
								</view>
								<view class="text" v-if="riskData.companyTypeId==21">
									是否设座：
									<view class="input-container">
										<uni-data-select v-model="riskData.isShezuo" :localdata="baseSelectList"
											:disabled="detail" :clear="false"
											:placeholder="'请选择是否设座'"></uni-data-select>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="addInspectContent" v-show="tabIndex == 1">
					<view class="box">
						<view class="dt">
							<view class="div">
								<view class="left">等级调整原因：</view>
								<view class="right">
									<view class="input-container">
										<input type="text" placeholder="请输入等级调整原因" :disabled="detail"
											v-model="riskData.adjustReason" placeholder-class="placeholder-class" />
									</view>
								</view>
							</view>
						</view>
						<view class="dt">
							<view class="h1">静态风险分值</view>
							<view class="dd" style="padding-bottom: 50px;">
								<view class="block">
									<view class="li">
										<view class="titles">
											<view class="text">
												静态分值
											</view>
											<input type="number" class="problem disabled-input"
												v-model="riskData.staticSplbScore" :disabled="true"
												placeholder-class="placeholder-class" />
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="dt">
							<view class="h1">动态风险分值</view>
							<view class="dd" style="padding-bottom: 50px;">
								<view class="block">
									<view class="li">
										<view class="titles">
											<view class="text">
												检查评分
											</view>
											<input type="number" class="problem disabled-input"
												v-model="riskData.dynamicCheckScore" :disabled="true"
												placeholder-class="placeholder-class" />
										</view>
									</view>
								</view>
							</view>
						</view>
						<!-- 动态设置的其他评分内容 -->
						<view class="dt" v-if="riskData.riskGradeScoreList.length > 0">
							<view class="h1">自定义评分</view>
							<view class="dd" style="padding-bottom: 50px;">
								<view class="block">
									<view class="li" v-for=" ( riskGrade ,index ) in  riskData.riskGradeScoreList">
										<view class="titles">
											<view class="text">
												{{riskGrade.gradeName }}
											</view>
											<input type="number" class="problem" placeholder="请输入分值" :disabled="detail"
												@input="calculateTotalScore" v-model="riskGrade.score"
												placeholder-class="placeholder-class" />
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="dt">
							<view class="h1">动态调整</view>
							<view class="dd" style="padding-bottom: 50px;">
								<view class="block">
									<checkbox-group @change="checkedGroup">
										<view class="dd2">
											<view class="dd2-title"><text>调高等级</text></view>
											<view class="li"
												v-for=" ( riskLevel ,index ) in  riskData.riskLevelDynamicList"
												v-if="riskLevel.type == '1'" :key="riskLevel.type+ '_' +index">
												<view class="titles">
													<view class="text">
														<checkbox :value="index" :disabled="detail || downRisk > 0"
															:checked="riskLevel.selection == '1'" />
														{{riskLevel.reason}}
													</view>
													<!-- <text class="righttop-title">
														{{riskLevel.score}}分 
													</text>  -->
												</view>
											</view>
										</view>
										<view class="dd2">
											<view class="dd2-title"><text>调低等级</text></view>
											<view class="li"
												v-for=" ( riskLevel ,index ) in  riskData.riskLevelDynamicList"
												v-if="riskLevel.type == '2'" :key="riskLevel.type+ '_' +index">
												<view class="titles">
													<view class="text">
														<checkbox :value="index"
															:disabled="detail || topRisk > 0 || topDRisk > 0"
															:checked="riskLevel.selection == '1'" />
														{{riskLevel.reason}}
													</view>
													<!-- <text class="righttop-title">
														{{riskLevel.score}}分
													</text> -->
												</view>
											</view>
										</view>
										<view class="dd2" v-if="subTotalCount > 0">
											<view class="dd2-title"><text>核减分值</text></view>
											<view class="li"
												v-for=" ( riskLevel ,index ) in  riskData.riskLevelDynamicList"
												v-if="riskLevel.type == '4'" :key="riskLevel.type+ '_' +index">
												<view class="titles">
													<view class="text">
														<checkbox :value="index" :disabled="detail"
															:checked="riskLevel.selection == '1'" />
														{{riskLevel.reason}}
													</view>
													<text class="righttop-title">
														{{riskLevel.score}}分
													</text>
												</view>
											</view>
										</view>
										<view class="dd2">
											<view class="dd2-title"><text>直接上调为D等级</text></view>
											<view class="li"
												v-for=" ( riskLevel ,index ) in  riskData.riskLevelDynamicList"
												v-if="riskLevel.type == '3'" :key="riskLevel.type+ '_' +index">
												<view class="titles">
													<view class="text">
														<checkbox :value="index" :disabled="detail  || downRisk > 0"
															:checked="riskLevel.selection == '1'" />{{riskLevel.reason}}
													</view>
													<!-- <text class="righttop-title">
														{{riskLevel.score}}分
													</text>  -->
												</view>
											</view>
										</view>
									</checkbox-group>
									<view class="dd2" v-if="topRisk > 0 || downRisk > 0">
										<view class="dd2-title"><text>升降级数</text></view>
										<view class="li">
											<input type="number" placeholder="请输入升降级数" @input="adjustLevelValid"
												:disabled="detail"
												v-model="riskData.adjustLevel == null ? 0 : riskData.adjustLevel "
												placeholder-class="placeholder-class" />
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
					<!--  静态总分 -->
					<view class="bottom-tab" :style="{bottom: detail ? '0px': '110rpx'}">
						<view style="height: 50rpx;background-color: #026DC6;padding: 10rpx 0px;text-align: center;">
							<text
								style="line-height: 20rpx;color:#fff">核减分值{{riskData.dynamicMinusScore}}风险等级得分{{riskData.dynamicLevelScore}}分</text>
						</view>
					</view>
				</view>
				<view class="fixed" v-if="!detail">
					<button class="determine" @tap="savePopup('2')">提交</button>
				</view>
			</view>
		</view>
		<!-- 提交弹窗 -->
		<uni-popup ref="popupTwo" type="bottom">
			<view class="popupContent">
				<view class="title">确定</view>
				<view class="box">
					提交当前评分？
				</view>
				<view class="button" style="padding-bottom:20px;">
					<button class="determine" @click="finalSave">确认</button>
					<button class="cancellation" @click="closeConfirm">返回</button>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import commonNavBar from '@/components/CommonNavBar.vue';

	export default {
		components: {
			commonNavBar
		},
		data() {
			return {
				tabIndex: 0,
				detail: false,
				baseUrl: uni.$baseUrl,
				stepList: [{
					step: '基础信息',
					active: true
				}, {
					step: '评分内容',
					active: false
				}],
				navHeight: 0,
				fengxianfen: 0, //风险分值
				topRisk: 0, //调高等级选中数
				downRisk: 0, //调低等级选中数
				subRisk: 0, //核减数选中数
				topDRisk: 0, //调整到D选中数
				topTotalCount: 0, //调高等级数
				downTotalCount: 0, //调低等级数
				subTotalCount: 0, //核减数数
				topDTotalCount: 0, //调整到D数
				riskLevelId: "",
				companyId: "",
				tm: null,
				qualityCertificationList: [{
					value: '1',
					text: 'ISO9000'
				}, {
					value: '2',
					text: 'HCCP'
				}, {
					value: '3',
					text: 'gmp'
				}, {
					value: '4',
					text: 'ISO2002'
				}, {
					value: '5',
					text: '其他'
				}], //是否
				baseSelectList: [{
						value: '1',
						text: '是'
					},
					{
						value: '0',
						text: '否'
					}
				], //食用人群
				ediblePopulationList: [], //从字典中查询的
				riskData: {
					totalScore: 0,
					adjustLevel: 0,
					sigOnePic: '',
					sigTwoPic: '',
					sigThreePic: '',
					checkId: '',
					lngLat: '',
					deptName: '',
					isShezuo: '是',
					riskGradeScoreList: [],
					scoreList: []
				} //页面数据
			}
		},
		filters: {
			userNameFilter(value, that) {
				for (var i = 0; i < that.userList.length; i++) {
					if (that.userList[i].id == value) {
						return that.userList[i].text;
					}
				}
				return '';
			}
		},
		onLoad(options) {
			this.riskLevelId = options.riskLevelId //传此参数未传其他参数是 审核未通过重新评级的
			this.companyId = options.companyId
			this.detail = options.detail == 'true' ? true : false
		},
		onReady() {
			const that = this;
			const query = uni.createSelectorQuery().in(this);
			query.select('#top').boundingClientRect(data => {
				that.navHeight = data.height + 30
			}).exec();
			//获取页面信息
			//this.getUserList();  
			this.initData();
		},
		methods: {
			stepActive(index) {
				this.tabIndex = index;
			},
			async initData() {
				uni.showLoading({
					title: '正在加载信息',
					mask: true
				})
				const res = await uni.$api.getRiskLevelInfo({
					riskLevelId: this.riskLevelId, //审核不通过的时候进来会传递这个参数
					companyId: this.companyId //评定的时候会传递这个参数
				});
				if (res.data.code == '1') {
					uni.showModal({
						title: '提示',
						content: res.data.message,
						showCancel: false,
						success: function(res) {
							uni.navigateBack();
						}
					})
					return;
				}
				uni.hideLoading();
				this.riskData = res.data.data;
				this.riskData.isShezuo='1'
				if (this.riskData.message != null) {
					uni.showModal({
						title: '提示',
						content: this.riskData.message,
						showCancel: false
					})
				}
				this.checkedGroup(null);
			},
			closeConfirm() {
				this.$refs.popupTwo.close()
			},
			savePopup(type) {

				for (var i = 0; i < this.riskData.riskGradeScoreList.length; i++) {
					if (this.riskData.riskGradeScoreList[i].score == '' || this.riskData.riskGradeScoreList[i].score ==
						undefined) {
						uni.showToast({
							title: '自定义评分有未填写内容',
							icon: 'none'
						})
						return;
					}
				}
				this.$refs.popupTwo.open('bottom');

			},
			async finalSave(type) {
				uni.showLoading({
					title: '正在提交信息',
					mask: true
				})
				const res = await uni.$api.saveRiskLevelInfo({
					temporarily: "0",
					riskData: JSON.stringify(this.riskData)
				})
				uni.hideLoading();
				if (res.data.code != '0') {
					uni.showModal({
						icon: 'error',
						content: res.data.message,
						showCancel: false
					})
					return;
				}
				this.riskData = res.data.data;
				uni.showToast({
					icon: 'success',
					title: '保存成功'
				})
				const that = this;

				//生成确认表
				uni.navigateTo({
					url: '/pages/risk/riskConfirmTable?checkId=' + this.riskData.id,
					events: {
						// 为指定事件添加一个监听器，获取被打开页面传送到当前页面的数据
						reloadList2: function(data) {
							const eventChannel = that.getOpenerEventChannel();
							eventChannel.emit('reloadList');
							uni.navigateBack()
						}
					}
				})

			},
			showImage(url) {
				Vue.prototype.$previewImage(url);
			},
			adjustLevelValid(e) {
				const that = this;
				if (this.tm) {
					clearTimeout(this.tm);
					this.tm = null;
				}
				this.tm = setTimeout(function() {
					if (e.detail.value == '') {
						that.riskData.adjustLevel = 0;
					} else if (Number(e.detail.value) > 2) {
						that.riskData.adjustLevel = 2;
					} else if (Number(e.detail.value) < 0) {
						that.riskData.adjustLevel = 0;
					}
				}, 200)


			},
			// 智能客服
			robot(e) {
				uni.navigateTo({
					url: '/pages/robot/robot'
				})
			},
			loadSelectStatus() {
				//计算四种动态评分的数量
				this.topRisk = 0; //调高等级数
				this.downRisk = 0; //调低等级数
				this.subRisk = 0; //核减数
				this.topDRisk = 0; //调整到D数

				for (var i = 0; i < this.riskData.riskLevelDynamicList.length; i++) {
					switch (this.riskData.riskLevelDynamicList[i].type) {
						case "1":
							//调高等级 
							if (this.riskData.riskLevelDynamicList[i].selection == '1') {
								this.topRisk = this.topRisk + 1;
							}
							continue;
						case "2":
							//调低等级 
							if (this.riskData.riskLevelDynamicList[i].selection == '1') {
								this.downRisk = this.downRisk + 1;
							}
							continue;
						case "4":
							//核减数 
							if (this.riskData.riskLevelDynamicList[i].selection == '1') {
								this.subRisk = this.subRisk + 1;
							}
							continue;
						case "3":
							//调整到D 
							if (this.riskData.riskLevelDynamicList[i].selection == '1') {
								this.topDRisk = this.topDRisk + 1;
							}
							continue;
					}
				}
			},
			checkedGroup(e) {
				if (e != null) {
					let indexArray = e.target.value;
					for (var i = 0; i < this.riskData.riskLevelDynamicList.length; i++) {
						this.$set(this.riskData.riskLevelDynamicList[i], "selection", "0");
					}
					for (var i = 0; i < indexArray.length; i++) {
						this.$set(this.riskData.riskLevelDynamicList[indexArray[i]], "selection", "1");
					}
				}
				this.loadSelectStatus();

				//判断是否可选
				if (this.topDRisk > 0 && this.downRisk > 0) {
					uni.showModal({
						title: '提示',
						content: '调低等级与调整到D级不能同时选择！',
						showCancel: false,
						success() {
							return;
						}
					});
					return;
				}
				if (this.topRisk > 0 && this.downRisk > 0) {
					uni.showModal({
						title: '提示',
						content: '调高等级与调低等级不能同时选择！',
						showCancel: false,
						success() {
							return;
						}
					});
					return;
				}

				//调高等级，调低等级，直接调整D级这三种不算分
				this.calculateTotalScore();

			},
			calculateTotalScore() {
				this.riskData.dynamicLevelScore = 0;
				this.riskData.dynamicMinusScore = 0;
				if (this.riskData.staticSplbScore == '') {
					this.riskData.staticSplbScore = 0;
				}
				if (this.riskData.staticScaleScore == '') {
					this.riskData.staticScaleScore = 0;
				}
				if (this.riskData.staticCheckScore == '') {
					this.riskData.staticCheckScore = 0;
				}
				if (this.riskData.dynamicCheckScore == '') {
					this.riskData.dynamicCheckScore = 0;
				}
				if (this.riskData.creditScore == '') {
					this.riskData.creditScore = 0;
				}
				//静态自定义
				for (var i = 0; i < this.riskData.staticCustomScoreList.length; i++) {
					this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(this
						.riskData.staticCustomScoreList[i].score == undefined ? 0 : this.riskData
						.staticCustomScoreList[i].score);
				}

				//动态自定义
				for (var i = 0; i < this.riskData.dynamicCustomScoreList.length; i++) {
					this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(this
						.riskData.dynamicCustomScoreList[i].score == undefined ? 0 : this.riskData
						.dynamicCustomScoreList[i].score);
				}
				//信用自定义
				for (var i = 0; i < this.riskData.creditCustomScoreList.length; i++) {
					this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(this
						.riskData.creditCustomScoreList[i].score == undefined ? 0 : this.riskData
						.creditCustomScoreList[i].score);
				}
				this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(this.riskData
					.samplingScore == undefined ? 0 : this.riskData.samplingScore); //动态-抽样
				this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(this.riskData
					.appointmentScore == undefined ? 0 : this.riskData.appointmentScore); //动态-约谈
				this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(this.riskData
					.staticSplbScore == undefined ? 0 : this.riskData.staticSplbScore);
				this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(this.riskData
					.staticScaleScore == undefined ? 0 : this.riskData.staticScaleScore);
				this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(this.riskData
					.staticCheckScore == undefined ? 0 : this.riskData.staticCheckScore);
				this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(this.riskData
					.dynamicCheckScore == undefined ? 0 : this.riskData.dynamicCheckScore);
				this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(this.riskData
					.creditScore == undefined ? 0 : this.riskData.creditScore);
				console.log("this.riskData.dynamicLevelScore", this.riskData.dynamicLevelScore);
				let riskGradeScoreList = this.riskData.riskGradeScoreList;
				for (var i = 0; i < riskGradeScoreList.length; i++) {
					if (riskGradeScoreList[i].score == '' || riskGradeScoreList[i].score == undefined) {
						riskGradeScoreList[i].score = 0;
					}
					this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(
						riskGradeScoreList[i].score == undefined ? 0 : riskGradeScoreList[i].score);
				}
				let riskLevelDynamicList = this.riskData.riskLevelDynamicList;
				for (var i = 0; i < riskLevelDynamicList.length; i++) {
					/* 		if(riskLevelDynamicList[i].type == '1' && riskLevelDynamicList[i].selection == '1'){
								this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(riskLevelDynamicList[i].score == undefined ? 0 : riskLevelDynamicList[i].score);
								this.riskData.dynamicMinusScore = parseFloat(this.riskData.dynamicMinusScore) + parseFloat(riskLevelDynamicList[i].score == undefined ? 0 : riskLevelDynamicList[i].score);
							} else if(riskLevelDynamicList[i].type == '2' && riskLevelDynamicList[i].selection == '1'){
								this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) - parseFloat(riskLevelDynamicList[i].score == undefined ? 0 : riskLevelDynamicList[i].score);
								this.riskData.dynamicMinusScore = parseFloat(this.riskData.dynamicMinusScore) - parseFloat(riskLevelDynamicList[i].score == undefined ? 0 : riskLevelDynamicList[i].score);
							}  else 
							if(riskLevelDynamicList[i].type == '3' && riskLevelDynamicList[i].selection == '1'){
								this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) + parseFloat(riskLevelDynamicList[i].score == undefined ? 0 : riskLevelDynamicList[i].score);
								this.riskData.dynamicMinusScore = parseFloat(this.riskData.dynamicMinusScore) + parseFloat(riskLevelDynamicList[i].score == undefined ? 0 : riskLevelDynamicList[i].score);
							} 
							else*/
					if (riskLevelDynamicList[i].type == '4' && riskLevelDynamicList[i].selection == '1') {
						this.riskData.dynamicLevelScore = parseFloat(this.riskData.dynamicLevelScore) - parseFloat(
							riskLevelDynamicList[i].score == undefined ? 0 : riskLevelDynamicList[i].score);
						this.riskData.dynamicMinusScore = parseFloat(this.riskData.dynamicMinusScore) - parseFloat(
							riskLevelDynamicList[i].score == undefined ? 0 : riskLevelDynamicList[i].score);
					}
				}
				if (this.riskData.dynamicLevelScore < 0) {
					this.riskData.dynamicLevelScore = 0;
				}


			}
		}

	}
</script>

<style lang="scss">
	page {
		background: #F9F9F9;
		height: calc(100vh - 195rpx);
	}

	.top {
		position: fixed;
		top: 0px;
		z-index: 9999;
	}

	.righttop-title {
		padding: 5px 8px;
		background-color: #026DC6;
		color: #ffffff;
		font-size: 16rpx;
		text-align: center;
		line-height: 20rpx;
		width: 50px;
		height: 18rpx;
	}

	.intelligence {
		position: absolute;
		right: 30rpx;
		top: 50%;
		transform: translate(0%, -50%);
		font-size: 28rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		display: flex;

		image {
			width: 75rpx;
			height: 64rpx;
		}
	}

	.step {
		display: flex;
		justify-content: space-around;
		height: 80rpx;
		width: 750rpx;
		line-height: 80rpx;
		background: #F9F9F9;

		view {
			position: relative;
			font-size: 25rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;

			&.active {
				color: #0552A9;

				&::before {
					display: block;
					content: "";
					position: absolute;
					left: 50%;
					bottom: 0%;
					transform: translate(-50%, 0%);
					width: 100rpx;
					height: 5rpx;
					background: #0552A9;
				}
			}
		}
	}

	.addInspect {
		padding: 0 0 150rpx 0;

		.map {
			height: 80rpx;
			line-height: 80rpx;
			background: url('../../static/img/map.png') no-repeat center center;
			background-size: cover;
			font-size: 23rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #002E63;
			margin: 0 auto;
			display: flex;
			align-items: center;

			image {
				width: 22rpx;
				height: 26rpx;
				margin: 0 11rpx 0 53rpx;
			}
		}

		.content {

			.text {
				font-size: 19rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				margin: 0 auto 13rpx;
				min-height: 68rpx;
				line-height: 68rpx;
				display: flex;
				align-items: center;
				padding: 0 50rpx;
				background: #fff;

				text {
					color: #666666;
				}

				.uni-stat__select {
					width: 460rpx;

					/deep/.uni-select {
						border: none;
					}

					/deep/.uni-select__input-placeholder {
						font-size: 19rpx;
					}
				}

				.uni-date {
					width: 460rpx;

					/deep/.uni-date-editor--x {
						border: none;
					}
				}

				.custom-radio-group {
					display: flex;

					.labelRadio {
						display: flex;
						margin: 0 10rpx;
						align-items: center;
					}

					/deep/.uni-radio-input {
						width: 20rpx;
						height: 20rpx;
						border: 1rpx solid #979797;
					}

					.yes {

						/deep/.uni-radio-input {
							background: #07D276 !important;
							border-color: #07D276 !important;

							&::before {
								background: #07D276;
								border-radius: 50%;
								font-size: 16rpx;
							}
						}
					}

					.no {

						/deep/.uni-radio-input {
							background: #FF1F1F !important;
							border-color: #FF1F1F !important;
							position: relative;
							transform: rotate(45deg);

							&::before {
								content: "";
								position: absolute;
								top: 50%;
								left: 50%;
								background-color: #fff;
								width: 2rpx;
								height: 60%;
								transform: translate(-50%, -50%);
							}

							&::after {
								content: "";
								position: absolute;
								top: 50%;
								left: 50%;
								background-color: #fff;
								width: 60%;
								height: 2rpx;
								transform: translate(-50%, -50%);
							}
						}
					}
				}

				uni-navigator {
					display: flex;
					align-items: center;
					color: #0552A9;
				}

				&:nth-child(even) {
					background: #F9F9F9;
				}
			}

			.two {

				.box {

					.text {

						.input-container {

							input {
								font-size: 19rpx;
							}
						}

						.topicFlex {
							display: flex;
							justify-content: flex-start;
							width: 30%;
							text-overflow: ellipsis;
							white-space: nowrap;
							overflow: hidden;
						}

						text {
							width: 70%;
							line-height: 1.6;
							text-align: left;
						}
					}
				}

				.abnormal {

					.block {

						.text {

							.div {
								display: flex;
								flex-direction: column;
								line-height: initial;
							}
						}
					}
				}
			}

			.three {
			
				.box {
					.text {
			
						view {
							color: #1e4de6
						}
					}

					.facadePhoto {
						height: 150px;

						image {
							width: 100rpx;
							height: 100rpx;
						}
					}
				}
			}
		}
	}

	.centre {
		overflow-x: hidden;

		.content-container {

			.title {
				height: 73rpx;
				line-height: 73rpx;
				background: #E1EAF4;
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				text-indent: 50rpx;
				font-size: 24rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #002B5B;
			}
		}
	}

	.addInspectContent {
		padding: 0 0 110rpx 0;

		.content {
			padding: 10px;

			.text {
				font-size: 25rpx;
				color: #9f9f9f;

			}
		}

		.positioning {
			padding: 0 17.5rpx;
			display: flex;
			align-items: center;
			height: 56rpx;
			line-height: 56rpx;
			background: #33B97C;
			box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
			border-radius: 28rpx;
			font-size: 23rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			margin: 14rpx auto;

			image {
				width: 22rpx;
				height: 26rpx;
				margin: 0 11rpx 0 53rpx;
			}
		}

		.box {
			padding: 0 17.5rpx;

			.dt {
				background: #FFFFFF;
				box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
				border-radius: 15rpx;
				margin-top: 10px;
				padding: 23rpx 28rpx;

				.h1 {
					font-size: 24rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #0552A9;
					padding: 0 0 22rpx 0;
					border-bottom: 2rpx solid #CECECE;
				}

				.div {
					display: flex;
					margin: 21rpx auto 0;

					.left {
						font-size: 20rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #3A3A3A;
					}

					.right {
						font-size: 20rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #686868;

						text {
							color: #DC0000;
						}

						input {
							font-size: 20rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #999999;
							width: 400rpx;
							text-indent: 10rpx;
						}

						.placeholder-class {
							color: #999999;
						}
					}

					&:last-child {
						align-items: center;
					}

					.custom-radio-group {
						display: flex;
						font-size: 20rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;

						.labelRadio {
							display: flex;
							margin: 0 10rpx;
							align-items: center;
						}

						/deep/.uni-radio-input {
							width: 20rpx;
							height: 20rpx;
							border: 1rpx solid #979797;
						}

						.yes {

							/deep/.uni-radio-input {
								background: #07D276 !important;
								border-color: #07D276 !important;

								&::before {
									background: #07D276;
									border-radius: 50%;
									font-size: 16rpx;
								}
							}
						}

						.no {

							/deep/.uni-radio-input {
								background: #FF1F1F !important;
								border-color: #FF1F1F !important;
								position: relative;
								transform: rotate(45deg);

								&::before {
									content: "";
									position: absolute;
									top: 50%;
									left: 50%;
									background-color: #fff;
									width: 2rpx;
									height: 60%;
									transform: translate(-50%, -50%);
								}

								&::after {
									content: "";
									position: absolute;
									top: 50%;
									left: 50%;
									background-color: #fff;
									width: 60%;
									height: 2rpx;
									transform: translate(-50%, -50%);
								}
							}
						}
					}
				}
			}

			.dd {

				.h1 {
					font-size: 20rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #333333;
					margin: 10rpx auto;
					text-indent: 26rpx;
				}

				.block {
					background: #FFFFFF;
					padding: 23rpx 26rpx;
					border-bottom: 1px solid #e8e8e8;

					.dd2 {
						padding: 5px 0px;
						border-bottom: 1px solid #e3e3e3;

						.dd2-title {
							padding: 5px 0px;
							font-size: 25rpx;
							color: #222222;
							font-weight: 700;
						}
					}

					.li {

						.titles {
							font-size: 20rpx;
							font-family: PingFangSC-Medium, PingFang SC;
							font-weight: 500;
							color: #353535;
							position: relative;
							display: flex;

							text {
								margin: 0 6rpx 0 0;
							}

							.dec-text {
								margin: 0 6rpx 0 0;
								color: #a6a6a6;
							}

							&.red {

								text {
									color: #EF0000;
								}
							}

							.text {
								width: 76%;
							}

							.guide {
								position: absolute;
								top: 0;
								right: 0rpx;
								color: #026DC6;
								display: flex;
								align-items: center;

								image {
									width: 22rpx;
									height: 22rpx;
									margin: 0 6rpx 0 0;
								}

								.triangle {
									width: 0;
									height: 0;
									border-top: 8rpx solid transparent;
									border-bottom: 8rpx solid transparent;
									border-left: 10rpx solid #026DC6;
									position: absolute;
									top: 50%;
									right: -20rpx;
									transform: translate(-50%, -50%);
								}
							}
						}

						.optionList {
							display: flex;
							flex-direction: column;
							margin: 10px auto 0;
							align-items: center;

							.list {
								display: flex;

								.option {
									padding: 12rpx 30rpx;
									border: 2rpx solid #C3C3C3;
									border-radius: 5rpx 0 0 5rpx;
									font-size: 18rpx;
									font-family: PingFangSC-Regular, PingFang SC;
									font-weight: 400;
									color: #666666;

									&:nth-child(2) {
										border-left: none;
										// border-right: none;
										border-radius: 0;
									}

									&:last-child {
										border-radius: 0 5rpx 5rpx 0;
										border-left: 0;
									}

									&.active {
										background: #E9F2FF;
										color: #0552A9;
									}
								}
							}

							.case {
								width: 650rpx;

								.h2 {
									font-size: 16rpx;
									font-family: PingFangSC-Medium, PingFang SC;
									font-weight: 500;
									color: #353535;
									margin: 20rpx 0 6rpx 0;
								}

								input {
									margin: 20rpx auto;
									border: 2rpx solid #e5e5e5;
									// border: 2rpx solid red;
									border-radius: 6rpx;
									text-indent: 10rpx;
									font-size: 18rpx;
									padding: 16rpx 0;

									&.inspect {
										border: 2rpx solid yellow;
									}
								}

								.placeholder-class {
									color: red;
								}

								.placeholder-class-inspect {
									color: yellow;
								}
							}
						}

						&+.li {
							margin: 20rpx auto 0;

							.title {

								// text {
								// 	color: #353535;
								// }
							}
						}
					}
				}
			}
		}
	}

	.bottom-tab {
		position: fixed;
		bottom: 110rpx;
		width: 750rpx;

	}

	.uni-collapse-item__title-wrap {
		border-radius: 14px 14px 0px 0px;
	}

	.uni-collapse-item__title-box {
		text-align: center;
	}

	.uni-collapse-item__title-text {
		text-align: center;
	}

	.fixed {
		position: fixed;
		left: 0;
		bottom: 0;
		height: 92rpx;
		background: #fff;
		padding: 0 95rpx 24rpx 95rpx;
		margin: 0 auto;
		display: flex;
		align-items: center;
		width: calc(100% - 190rpx);

		button {
			width: 269rpx;
			height: 55rpx;
			line-height: 55rpx;
			background: #0552A9;
			border-radius: 10rpx;
			font-size: 20rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;

			&.determine {
				color: #fff;
			}

			&.cancellation {
				background: none;
				border: 1rpx solid #979797;
				color: #979797;
			}
		}
	}

	.noticeFormPopupContent {
		border-radius: 20rpx 20rpx 0 0;
		background-color: #ffffff;

		.title {
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			background: url('../../static/img/popupTitle.png') no-repeat center center;
			background-size: cover;
			font-size: 25rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			// text-indent: 45rpx;
			text-align: center;
		}

		.h1Title {
			font-size: 26rpx;
			margin: 20rpx auto 0;
			text-align: center;
		}

		.h2Ttitle {
			font-size: 30rpx;
			text-align: center;
		}

		.signature {
			width: 100px;
		}

		.box {
			padding: 45rpx 30rpx;
			height: 400px;
			overflow-x: hidden;

			.div {
				border-top: 2rpx solid #D6D6D6;
				border-left: 2rpx solid #D6D6D6;
				border-right: 2rpx solid #D6D6D6;
				line-height: initial;
				height: initial;
				min-height: 82rpx;
				position: relative;
				display: flex;
				align-items: center;
				justify-content: flex-start;
				font-size: 21rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				border-bottom: 2rpx solid #D6D6D6;

				&::before {
					content: "";
					display: block;
					width: 2rpx;
					height: 100%;
					background: #D6D6D6;
					position: absolute;
					top: 50%;
					left: 229rpx;
					transform: translate(-50%, -50%);
				}

				.titles {
					width: 229rpx;
					line-height: 1.2;
					height: 100%;
					display: flex;
					flex-direction: column;
					justify-content: center;
					margin: 0 20rpx 0 0;
					border-right: 0;
					padding-left: 10px;
				}

				.textarea {
					width: 50%;
					padding: 10rpx 0;
				}

				input {
					font-size: 21rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					width: 460rpx;
					text-indent: 20rpx;
				}

				.value {
					font-size: 21rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					width: 460rpx;
					text-indent: 20rpx;
					padding-left: 10px;
				}

				.placeholder-class {
					color: #999999;
				}

				.uni-stat__select {
					width: 460rpx;

					/deep/.uni-select {
						border: none;
					}
				}

				.uni-date {
					width: 460rpx;

					/deep/.uni-date-editor--x {
						border: none;
					}
				}

				&+.div {
					border-top: none;
				}
			}
		}

		.button {
			margin: 28rpx auto 0;
			display: flex;
			justify-content: space-around;
			align-items: center;
			padding-bottom: 20px;

			button {
				width: 269rpx;
				height: 55rpx;
				line-height: 55rpx;
				background: #0552A9;
				border-radius: 10rpx;
				font-size: 20rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;

				&.determine {
					color: #fff;
				}

				&.cancellation {
					background: none;
					border: 1rpx solid #979797;
					color: #979797;
				}
			}
		}
	}

	.popupContent,
	.popupContentTwo {
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 0 0;

		.title {
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			background: url('../../static/img/popupTitle.png') no-repeat center center;
			background-size: cover;
			font-size: 25rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			// text-indent: 45rpx;
			text-align: center;
		}

		.box {
			text-align: center;
			margin: 50rpx auto;
		}

		.button {
			margin: 58rpx auto 0;
			display: flex;
			justify-content: space-around;
			align-items: center;

			button {
				width: 269rpx;
				height: 55rpx;
				line-height: 55rpx;
				background: #0552A9;
				border-radius: 10rpx;
				font-size: 20rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;

				&.determine {
					color: #fff;
				}

				&.cancellation {
					background: none;
					border: 1rpx solid #979797;
					color: #979797;
				}
			}
		}
	}

	.sig-image {
		width: 100px;
		height: 50px;
		margin-left: 20px;
	}

	.inform-image {
		width: 100px;
		height: 100px;
		margin-left: 10px;
		margin-right: 10px;
	}

	.right-btn {
		color: #ffffff;
	}

	.problem {
		text-align: right;
		border-bottom: 1px solid #D6D6D6;
	}

	.disabled-input {
		border-bottom: 0px;
	}
</style>